package com.yc.bran.snack;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

import com.mongodb.client.MongoClient;
import com.mongodb.client.MongoClients;

@SpringBootApplication
@MapperScan("com.yc.bran.snack.mapper")
public class StartApplication {
	public static void main(String[] args) {
//		MongoClient mongoClient;
//		
//		    try {
//		        //连接到MongoDB服务 如果是远程连接可以替换“localhost”为服务器所在IP地址
//		        mongoClient = MongoClients.create("mongodb://root:a@127.0.0.1:27017/snack");
//		        System.out.println("Connect to database successfully");
//		    } catch (Exception e) {
//		        System.err.println( e.getClass().getName() + ": " + e.getMessage() );
//		    }
		System.out.println("启动成功");
		SpringApplication.run(StartApplication.class, args);
	}
}
